package com.example.wallet.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.math.BigDecimal;
import java.math.BigInteger;
import java.util.Date;

/**
 * @author 岸
 * 金额变动记录
 * operation 0-支出 1-提现 2-退款
 * amountChange 金额变动数量
 */
@Data
@NoArgsConstructor
@AllArgsConstructor
@TableName("amount_record")
public class Record {
    @TableId(type = IdType.AUTO)
    private Integer id;
    private Integer userId;
    private BigInteger orderId;
    private BigDecimal amountChange;
    private Integer operation;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    private Date createTime;
}
